program_directory


Description

This will return the directory where the game executable is stored. However this may not always be useful, particularly as some devices run the exe from a *.zip file, so this would return the same no matter where the game is actually running from.

WARNING! This function may not work as you expect due to GameMaker Studio 2 being sandboxed! Please see the section on File System Limits for more information.


Syntax:

program_directory


Returns:

String


Example:

dir = program_directory;

This will store the directory where the executable is stored in a variable.